import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    ksinTemplate: [
      {
        title: "深色",
        className: "dard-black",
        color: "#ffffff",
        cardBackground: "#12273c",
        background: "#04142b",
        gridColor: "#eeeeee",
        cardFontColor: "#ffffff",
        cardLine: "#eeeeee"
      },
      {
        title: "浅色",
        className: "month-white",
        color: "#676767",
        cardBackground: "#ffffff",
        background: "#f7f7f7",
        gridColor: "#eeeeee",
        cardFontColor: "#676767",
        cardLine: "#eeeeee"
      }
    ],
    predefineColors: [
      "rgb(39, 161, 234)",
      "rgb(98, 213, 178)",
      "rgb(150, 161, 172)",
      "rgb(255, 193, 16)",
      "rgb(251, 110, 108)",
      "rgb(33, 194, 219)",
      "rgb(146, 135, 231)",
      "#164E72",
      "rgb(31, 128, 187)",
      "rgb(78, 170, 142)",
      "rgb(104, 112, 120)",
      "rgb(228, 163, 69)",
      "rgb(200, 88, 86)",
      "rgb(26, 155, 175)",
      "rgb(116, 108, 187)",
      "#053B59",
      "rgb(35, 144, 210)",
      "rgb(87, 191, 159)",
      "rgb(134, 144, 154)",
      "rgb(254, 182, 77)",
      "rgb(225, 98, 96)",
      "rgb(29, 174, 196)",
      "rgb(131, 121, 207)",
      "#2C6689",
      "rgb(82, 179, 238)",
      "rgb(129, 221, 193)",
      "rgb(181, 189, 197)",
      "rgb(255, 218, 67)",
      "rgb(251, 139, 137)",
      "rgb(90, 219, 239)",
      "rgb(167, 159, 235)",
      "#5683A1",
      "rgb(125, 198, 242)",
      "rgb(161, 229, 208)",
      "rgb(202, 208, 213)",
      "rgb(255, 232, 142)",
      "rgb(252, 168, 166)",
      "rgb(132, 228, 243)",
      "rgb(189, 183, 240)",
      "#93B8D2",
      "#ffffff",
      "#000000",
      "rgba(0, 0, 0, 0)"
    ],
    colorMap: [
      { id: "1", name: "经典", colors: ["#002C53", "#FFA510", "#0C84C6", "#FFBD66", "#F74D4D", "#2455A4", "#41B7AC"] },
      { id: "2", name: "明亮", colors: ["#0E72CC", "#6CA30F", "#F59311", "#FA4343", "#16AFCC", "#85C021", "#D12A6A"] },
      { id: "3", name: "商务", colors: ["#194F97", "#555555", "#BD6B08", "#00686B", "#C82D31", "#625BA1", "#898989", "#9C9800", "#007F54", "#A195C5"] },
      { id: "4", name: "经典高亮", colors: ["#00D0F5", "#1A97FF", "#FFD87B", "#FF8249", "#7ECF93", "#00B67D", "#9BCBE7", "#7E87FB", "#FFACB5", "#E36969", "#C9B59B", "#3C86AB"] },
      { id: "5", name: "高对比度", colors: ["#52ACE9", "#2E4161", "#FFBE3A", "#E25867", "#90CB7E", "#009787", "#AD8268"] },
      { id: "6", name: "新特性", colors: ["#63B2EE", "#76DA91", "#F8CB7F", "#F89588", "#7CD6CF", "#9192AB", "#7898E1", "#EFA666", "#EDDD86", "#9987CE"] },
    ],
    fontFamilys: [
      { label: "默认字体", value: "normal" },
      { label: "黑体", value: "黑体" },
      { label: "仿宋", value: "仿宋" },
      { label: "楷体", value: "楷体" },
    ]
  },
  mutations: {
  },
  actions: {
  },
  modules: {
  },
  getters: {
    ksinTemplate: state => state.ksinTemplate,
    getKsinDetail: (state) => (className) => {
      return state.ksinTemplate.find(e => {
        return e.className == className
      })
    },
    predefineColors: state => state.predefineColors,
    colorMap: state => state.colorMap,
    fontFamilys: state => state.fontFamilys,
  }
})
